{messages block='ForumPosts'}

<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
<td>
{bookmarks}
</td>
<td style="text-align:right;">
    <a href="{url link='public.rss' act=posts id=$iTopicId rss=10}">
    <img src="design/pic/rss10.gif" class="sqr" style="vertical-align:middle;" alt="{language text="rss_1_0"}" title="{language text="link_to_rss_1_0"}"/>
    </a>
    &nbsp;&nbsp;&nbsp;
    <a href="{url link='public.rss' act=posts id=$iTopicId rss=20}">
    <img src="design/pic/rss20.gif" class="sqr" style="vertical-align:middle;" alt="{language text="rss_2_0"}" title="{language text="link_to_rss_2_0"}"/>
    </a>
</td>
</tr>
</table>
    <br />

<table style="width:100%;" cellpadding="0">
    <tr>
        <td style="width:60%;font-size:7pt;" class="color"></td>
        <td style="text-align:right;font-size:7pt;">
            {include file="`$sRootPath`/_blocks/pager.html"}
        </td>
    </tr>
</table>

<table style="width:100%;" class="forum-1" cellpadding="5" cellspacing="1">
    <tr>
        <td style="font-size:8pt;">{language text="total_views"}: {$aTopic.view} - {language text="total_replies"}: {$aTopic.total_replies}</td>
    </tr>
</table>

{* START TOPIC MESSAGE *}
{if $aTopic and ('last' == $aPaging.current or '1' == $aPaging.current)}
<a name="top"></a> <a name="t{$aTopic.id}"></a>
<table style="width:100%;" class="forum-2" cellpadding="5" cellspacing="1">
    <tr>
        <td style="vertical-align:top;font-size:8pt;width:20%;text-align:center;" class="forum-3">

        <a href="{url link='public.user' name=$aTopic.user}">
            {Account::Avatar sUser=$aTopic.user iSize=75 class="pic1" onmouseover="showInfo5('`$aTopic.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
        </a>

        <div style="padding:5px;">{img src=$aTopic.memb_image alt="" style="vertical-align:middle;"}</div>
        {if !getParam('profile_display_points')}
        <div style="padding:5px;"><span>{include file="`$sRootPath`/_blocks/stars.html" aUserStarsInfo=$aTopic.stars_info}</span></div>
        {/if}
        {if $bIsAdmin}
            <br /><br />
            <a class="link_action" href="{url link='current' act='forum_topic_delete'}" onclick="return sure('{language text="are_you_sure_to_delete_this_topic"}');">[ {language text="delete_topic"} ]</a>
            <br /><br />
            <a class="link_action" href="{url link='public.forum.move-topic' id=$aTopic.id}">[ {language text="move_topic_141"} ]</a>
            <br />
        {/if}
        <br />

        </td>
        <td style="vertical-align:top;font-size:8pt;width:80%;" class="forum-4">

        <table style="width:100%;" class="forum-2">
            <tr>
                <td style="width:50%;font-size:8pt;">{language text="posted_by"}: <a href="{url link='public.user' name=$aTopic.user}">{$aTopic.user}</a> {language text="on"} {$aTopic.time|date_format:$sDateTimeFormat}</td>
                <td style="width:50%;font-size:8pt;text-align:right;">
                    {if $bIsAdmin || $bTopicAuthor}
                        <a class="link_action" href="{url link='public.forum.topic-post' id=$aTopic.type topic=$aTopic.id}">[ {language text="edit"} ]</a>
                    {/if}
                    {if getUser('id')}
                    <a class="link_action" href="{url link='public.forum.posts' id=$aTopic.id post='reply' quote='start'}">[ {language text="quote"} ]</a>
                    {/if}
                </td>
            </tr>
        </table>

        <br />
        <br />

        <div style="padding:10px;">{$aTopic.text|process_code}</div>

        {if $aTopic.user_headline}
        <br /><br /><br /><br />
        <div style="padding:5px;">-------------------------------------------------------------- <br />
        {$aTopic.user_headline|process_code}</div>
        {/if}

        </td>
    </tr>

</table>
{/if}
{* END TOPIC MESSAGE *}

{foreach from=$aPosts item=aPost}
<a name="r{$aPost.id}"></a>
<table style="width:100%;" class="forum-2" cellpadding="5" cellspacing="1">
    <tr>
        <td style="vertical-align:top;font-size:8pt;width:20%;text-align:center;" class="forum-3">
        <a href="{url link='public.user' name=$aPost.user}">
            {Account::Avatar sUser=$aPost.user iSize=75 class="pic1" onmouseover="showInfo5('`$aPost.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
        </a>

        <div style="padding:5px;">{img src=$aPost.memb_image alt="" style="vertical-align:middle;"}</div>
        {if !getParam('profile_display_points')}
        <div style="padding:5px;"><span>{include file="`$sRootPath`/_blocks/stars.html" aUserStarsInfo=$aPost.stars_info}</span></div>
        {/if}
        <br /><br /><br />
        <br />

        </td>
        <td style="vertical-align:top;font-size:8pt;width:80%;" class="forum-4">

        <table style="width:100%;" class="forum-2">
            <tr>
                <td style="width:50%;font-size:8pt;">{language text="posted_by"}: <a href="{url link='public.user' name=$aPost.user}">{$aPost.user}</a> on {$aPost.time|date_format:$sDateTimeFormat}</td>
                <td style="width:50%;font-size:8pt;text-align:right;">
                	{if getUser('id')}
                    <a class="link_action" href="{url link='current' id=$aTopic.id post='reply' quote=$aPost.id}">[ {language text="quote"} ]</a>
                    {/if}
                    {if $aPost.can_delete}<a class="link_action" href="{url link='current' act='forum_post_delete' del=$aPost.id}" onclick="return sure('');">[ {language text="delete"} ]</a> {/if}
                    {if $aPost.can_edit}<a class="link_action" href="{url link='current' editpost=$aPost.id}">[ {language text="edit"} ]</a>{/if}
                </td>
            </tr>
        </table>

        <br /><br />

        <div style="padding:10px;">{$aPost.text|process_code}</div>

        {if $aPost.user_headline}
        <br /><br /><br /><br />
        <div style="padding:5px;">-------------------------------------------------------------- <br />
        {$aPost.user_headline|process_code}</div>
        {/if}

        </td>
    </tr>

    <tr>
        <td style="vertical-align:top;font-size:7pt;" class="forum-3" colspan="2"><a href="{$sUrl}#top">{language text="back_to_top"}</a></td>
    </tr>

</table>
{/foreach}


<table style="width:100%;" class="forum-1" cellpadding="5" cellspacing="1">
    <tr>
        <td style="font-size:8pt;">{$dtToday|date_format:$sDateFormat}</td>
    </tr>
</table>


<table style="width:100%;" cellpadding="0">
    <tr>
        <td style="width:60%;font-size:7pt;" class="color"></td>
        <td style="text-align:right;font-size:7pt;">
           {include file="`$sRootPath`/_blocks/pager.html"}
        </td>
    </tr>
</table>

<br />